{% extends 'layout.html' %}
{% load mytags %}
{% block content %}
    <div>
        <a href="" class="btn btn-primary btn-sm">增加</a>
    </div>
    <form action="" method="get" class="form-inline pull-right">
        <input type="text" name="query" class="form-control">
        <button class="btn btn-sm btn-primary">查询</button>
    </form>
    <table class="table-hover table-bordered table">
        <thead>
        <tr>
            <th>序号</th>
            <th>客户</th>
            <th>所报班级</th>
            <th>报名日期</th>
            <th>审核</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for enrollment in enrollments %}
            <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ enrollment.customer }}</td>
                <td>{{ enrollment.enrolment_class}}</td>
                <td>{{ enrollment.enrolled_date}}</td>
                <td>{{ enrollment.contract_approved|yesno:'审核通过,尚未审核'}}</td>
                <td><a href="{% url_tag 'crm:enrollment_edit' request enrollment.pk %}" class="btn btn-danger btn-sm">编辑</a></td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <nav aria-label="Page navigation">
        <ul class="pagination">
            {{ page_html }}
        </ul>
    </nav>
{% endblock %}